var VMenu =
{
	tscroll : "",
	interval : 10,
	offset : 5,
	
	scrollUp : function(menuID)
	{
		VMenu.scrollMove(menuID, VMenu.offset);
	},

	scrollDown : function(menuID)
	{
		VMenu.scrollMove(menuID, -VMenu.offset);
	},
	
	scrollMove : function(menuID, offset)
	{
		VMenu.tscroll = setInterval("VMenu.scrollMoveAux('"+menuID+"',"+offset+")", VMenu.interval);
	},
	
	scrollMoveAux : function(menuID, offset)
	{
		var scrollArea = document.getElementById(menuID + "_scrollArea");
		var frame = document.getElementById(menuID);
		var newTop = scrollArea.offsetTop+offset;
		var frameHeight = frame.offsetHeight;
		var scrollAreaHeight = scrollArea.offsetHeight;
		
		if( ( (offset<0) && (newTop>frameHeight-scrollAreaHeight) ) || ( (offset>0) && (newTop<=0) ) )
			scrollArea.style.top = scrollArea.offsetTop + offset + "px";
	},
	
	scrollEnd : function()
	{
		if(VMenu.tscroll)
			clearInterval(VMenu.tscroll);
	}
}

// Common.addEventListener(document, "mouseup", VMenu.scrollEnd, false)